]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Use the BoxPointer APIs for hiding without animating
authorJasper St. Pierre <jstpierre@mecheye.net>
Fri, 2 Aug 2013 04:11:16 +0000 (00:11 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 16 Aug 2013 01:53:00 +0000 (21:53 -0400)
js/ui/messageTray.js

index 4fae78978972deab6f1e9a4e21c5f1362cadc5a1..c42652f70189b54220f69ece2a169c2312385348 100644 (file)
@@ -2717,15 +2717,9 @@ const MessageTray = new Lang.Class({
             this._sourceDoneDisplayingId = 0;
         }
 
-        if (this._summaryBoxPointerItem.source.notifications.length == 0) {
-            this._summaryBoxPointer.actor.hide();
-            this._hideSummaryBoxPointerCompleted();
-        } else {
-            if (global.stage.key_focus &&
-                !this.actor.contains(global.stage.key_focus))
-                this._setClickedSummaryItem(null);
-            this._summaryBoxPointer.hide(BoxPointer.PopupAnimation.FULL, Lang.bind(this, this._hideSummaryBoxPointerCompleted));
-        }
+        let animate = (this._summaryBoxPointerItem.source.notifications.length > 0);
+        this._summaryBoxPointer.hide(animate ? BoxPointer.PopupAnimation.FULL : BoxPointer.PopupAnimation.NONE,
+                                     Lang.bind(this, this._hideSummaryBoxPointerCompleted));
     },
 
     _hideSummaryBoxPointer: function() {